#pragma once

using namespace System;
using namespace System::Collections::Generic;
using namespace System::Text;
using namespace System::Runtime::InteropServices;

namespace SbCli
{
	public ref class Output sealed
	{
	private:
		Output()
		{
		}

	public:
		static void Print(String^ s)
		{
			IntPtr ptr = Marshal::StringToHGlobalUni(s);
			k_outputl(static_cast<kwchar*>(ptr.ToPointer()));
			Marshal::FreeHGlobal(ptr);
		}

		static void Print(String^ fmt, ... array<Object^>^ args)
		{
			String^ s = String::Format(fmt, args);
			Print(s);
		}

		static void Mesg(String^ s)
		{
			IntPtr ptr = Marshal::StringToHGlobalUni(s);
			k_mesgl(static_cast<kwchar*>(ptr.ToPointer()));
			Marshal::FreeHGlobal(ptr);
		}

		static void Mesg(String^ fmt, ... array<Object^>^ args)
		{
			String^ s = String::Format(fmt, args);
			Mesg(s);
		}
	};
}
